#fourthfight.py
import combat

punch = combat.Attack('punch', (('d2', combat.DT.CRUSH),) )
  
knife = combat.Attack('knife', (('d4', combat.DT.PIERCE),) )
    
evasion = combat.Defense('evasion',
    effect = combat.FX.DODGE)

Harry = combat.Combatant('Harry')
Harry.ClearAttacks()

Sally = combat.Combatant('Sally', introcomments= ["You're gonna get beat by a girl"])
Sally.ClearAttacks()
Sally.ClearDefenses()


Harry.AddAttack(punch, ["{name} swings at {opponent}.", "{name} swings"])
Sally.AddAttack(knife, ["Sally stabs {opponent}.",])
Sally.AddDefense(evasion, ["Sally ducks.", "Sally does the limbo under {opponent}'s attack."])

Manager = combat.CombatManager([Harry, Sally])
Manager.setOrderer(combat.InitiativeOrder, attribute = 'speed')
Manager.processcombat()